package com.lehecai.core.lottery.content.impl;

import com.lehecai.core.lottery.LotteryType;

/**
 * 可指定每个投注项的彩种的属性
 * User: sunshow
 */
public class LotteryTypeSpecifiedElementAttribute extends CommonElementAttribute {

    private LotteryType lotteryType;

    public LotteryTypeSpecifiedElementAttribute() {
        super();
    }

    public LotteryTypeSpecifiedElementAttribute(String attribute, LotteryType lotteryType) {
        super(attribute);
        this.setLotteryType(lotteryType);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder(super.toString());

        if (this.getLotteryType() != null) {
            sb.append(ATTRIBUTE_SEPARATOR).append(this.getLotteryType().getValue());
        }

        return sb.toString();
    }

    public LotteryType getLotteryType() {
        return lotteryType;
    }

    public void setLotteryType(LotteryType lotteryType) {
        this.lotteryType = lotteryType;
    }
}
